Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

U11(tt, N, X, XS) → U12(splitAt(activate(N), activate(XS)), activate(X))
U12(pair(YS, ZS), X) → pair(cons(activate(X), YS), ZS)
afterNth(N, XS) → snd(splitAt(N, XS))
and(tt, X) → activate(X)
fst(pair(X, Y)) → X
head(cons(N, XS)) → N
natsFrom(N) → cons(N, n__natsFrom(s(N)))
sel(N, XS) → head(afterNth(N, XS))
snd(pair(X, Y)) → Y
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U11(tt, N, X, activate(XS))
tail(cons(N, XS)) → activate(XS)
take(N, XS) → fst(splitAt(N, XS))
natsFrom(X) → n__natsFrom(X)
activate(n__natsFrom(X)) → natsFrom(X)
activate(X) → X

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

U11(tt, N, X, XS) → U12(splitAt(activate(N), activate(XS)), activate(X))
U12(pair(YS, ZS), X) → pair(cons(activate(X), YS), ZS)
afterNth(N, XS) → snd(splitAt(N, XS))
and(tt, X) → activate(X)
fst(pair(X, Y)) → X
head(cons(N, XS)) → N
natsFrom(N) → cons(N, n__natsFrom(s(N)))
sel(N, XS) → head(afterNth(N, XS))
snd(pair(X, Y)) → Y
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U11(tt, N, X, activate(XS))
tail(cons(N, XS)) → activate(XS)
take(N, XS) → fst(splitAt(N, XS))
natsFrom(X) → n__natsFrom(X)
activate(n__natsFrom(X)) → natsFrom(X)
activate(X) → X

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

U111(tt, N, X, XS) → ACTIVATE(XS)
AFTERNTH(N, XS) → SPLITAT(N, XS)
U111(tt, N, X, XS) → ACTIVATE(N)
SEL(N, XS) → AFTERNTH(N, XS)
SPLITAT(s(N), cons(X, XS)) → U111(tt, N, X, activate(XS))
ACTIVATE(n__natsFrom(X)) → NATSFROM(X)
SPLITAT(s(N), cons(X, XS)) → ACTIVATE(XS)
U111(tt, N, X, XS) → SPLITAT(activate(N), activate(XS))
AND(tt, X) → ACTIVATE(X)
TAKE(N, XS) → SPLITAT(N, XS)
U111(tt, N, X, XS) → ACTIVATE(X)
U121(pair(YS, ZS), X) → ACTIVATE(X)
AFTERNTH(N, XS) → SND(splitAt(N, XS))
U111(tt, N, X, XS) → U121(splitAt(activate(N), activate(XS)), activate(X))
TAKE(N, XS) → FST(splitAt(N, XS))
TAIL(cons(N, XS)) → ACTIVATE(XS)
SEL(N, XS) → HEAD(afterNth(N, XS))

The TRS R consists of the following rules:

U11(tt, N, X, XS) → U12(splitAt(activate(N), activate(XS)), activate(X))
U12(pair(YS, ZS), X) → pair(cons(activate(X), YS), ZS)
afterNth(N, XS) → snd(splitAt(N, XS))
and(tt, X) → activate(X)
fst(pair(X, Y)) → X
head(cons(N, XS)) → N
natsFrom(N) → cons(N, n__natsFrom(s(N)))
sel(N, XS) → head(afterNth(N, XS))
snd(pair(X, Y)) → Y
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U11(tt, N, X, activate(XS))
tail(cons(N, XS)) → activate(XS)
take(N, XS) → fst(splitAt(N, XS))
natsFrom(X) → n__natsFrom(X)
activate(n__natsFrom(X)) → natsFrom(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

U111(tt, N, X, XS) → ACTIVATE(XS)
AFTERNTH(N, XS) → SPLITAT(N, XS)
U111(tt, N, X, XS) → ACTIVATE(N)
SEL(N, XS) → AFTERNTH(N, XS)
SPLITAT(s(N), cons(X, XS)) → U111(tt, N, X, activate(XS))
ACTIVATE(n__natsFrom(X)) → NATSFROM(X)
SPLITAT(s(N), cons(X, XS)) → ACTIVATE(XS)
U111(tt, N, X, XS) → SPLITAT(activate(N), activate(XS))
AND(tt, X) → ACTIVATE(X)
TAKE(N, XS) → SPLITAT(N, XS)
U111(tt, N, X, XS) → ACTIVATE(X)
U121(pair(YS, ZS), X) → ACTIVATE(X)
AFTERNTH(N, XS) → SND(splitAt(N, XS))
U111(tt, N, X, XS) → U121(splitAt(activate(N), activate(XS)), activate(X))
TAKE(N, XS) → FST(splitAt(N, XS))
TAIL(cons(N, XS)) → ACTIVATE(XS)
SEL(N, XS) → HEAD(afterNth(N, XS))

The TRS R consists of the following rules:

U11(tt, N, X, XS) → U12(splitAt(activate(N), activate(XS)), activate(X))
U12(pair(YS, ZS), X) → pair(cons(activate(X), YS), ZS)
afterNth(N, XS) → snd(splitAt(N, XS))
and(tt, X) → activate(X)
fst(pair(X, Y)) → X
head(cons(N, XS)) → N
natsFrom(N) → cons(N, n__natsFrom(s(N)))
sel(N, XS) → head(afterNth(N, XS))
snd(pair(X, Y)) → Y
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U11(tt, N, X, activate(XS))
tail(cons(N, XS)) → activate(XS)
take(N, XS) → fst(splitAt(N, XS))
natsFrom(X) → n__natsFrom(X)
activate(n__natsFrom(X)) → natsFrom(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 15 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
QDP
          ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

SPLITAT(s(N), cons(X, XS)) → U111(tt, N, X, activate(XS))
U111(tt, N, X, XS) → SPLITAT(activate(N), activate(XS))

The TRS R consists of the following rules:

U11(tt, N, X, XS) → U12(splitAt(activate(N), activate(XS)), activate(X))
U12(pair(YS, ZS), X) → pair(cons(activate(X), YS), ZS)
afterNth(N, XS) → snd(splitAt(N, XS))
and(tt, X) → activate(X)
fst(pair(X, Y)) → X
head(cons(N, XS)) → N
natsFrom(N) → cons(N, n__natsFrom(s(N)))
sel(N, XS) → head(afterNth(N, XS))
snd(pair(X, Y)) → Y
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U11(tt, N, X, activate(XS))
tail(cons(N, XS)) → activate(XS)
take(N, XS) → fst(splitAt(N, XS))
natsFrom(X) → n__natsFrom(X)
activate(n__natsFrom(X)) → natsFrom(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule U111(tt, N, X, XS) → SPLITAT(activate(N), activate(XS)) at position [0] we obtained the following new rules:

U111(tt, n__natsFrom(x0), y1, y2) → SPLITAT(natsFrom(x0), activate(y2))
U111(tt, x0, y1, y2) → SPLITAT(x0, activate(y2))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
QDP
              ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U111(tt, x0, y1, y2) → SPLITAT(x0, activate(y2))
SPLITAT(s(N), cons(X, XS)) → U111(tt, N, X, activate(XS))
U111(tt, n__natsFrom(x0), y1, y2) → SPLITAT(natsFrom(x0), activate(y2))

The TRS R consists of the following rules:

U11(tt, N, X, XS) → U12(splitAt(activate(N), activate(XS)), activate(X))
U12(pair(YS, ZS), X) → pair(cons(activate(X), YS), ZS)
afterNth(N, XS) → snd(splitAt(N, XS))
and(tt, X) → activate(X)
fst(pair(X, Y)) → X
head(cons(N, XS)) → N
natsFrom(N) → cons(N, n__natsFrom(s(N)))
sel(N, XS) → head(afterNth(N, XS))
snd(pair(X, Y)) → Y
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U11(tt, N, X, activate(XS))
tail(cons(N, XS)) → activate(XS)
take(N, XS) → fst(splitAt(N, XS))
natsFrom(X) → n__natsFrom(X)
activate(n__natsFrom(X)) → natsFrom(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule U111(tt, n__natsFrom(x0), y1, y2) → SPLITAT(natsFrom(x0), activate(y2)) at position [0] we obtained the following new rules:

U111(tt, n__natsFrom(x0), y1, y2) → SPLITAT(n__natsFrom(x0), activate(y2))
U111(tt, n__natsFrom(x0), y1, y2) → SPLITAT(cons(x0, n__natsFrom(s(x0))), activate(y2))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
QDP
                  ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

U111(tt, n__natsFrom(x0), y1, y2) → SPLITAT(n__natsFrom(x0), activate(y2))
U111(tt, x0, y1, y2) → SPLITAT(x0, activate(y2))
SPLITAT(s(N), cons(X, XS)) → U111(tt, N, X, activate(XS))
U111(tt, n__natsFrom(x0), y1, y2) → SPLITAT(cons(x0, n__natsFrom(s(x0))), activate(y2))

The TRS R consists of the following rules:

U11(tt, N, X, XS) → U12(splitAt(activate(N), activate(XS)), activate(X))
U12(pair(YS, ZS), X) → pair(cons(activate(X), YS), ZS)
afterNth(N, XS) → snd(splitAt(N, XS))
and(tt, X) → activate(X)
fst(pair(X, Y)) → X
head(cons(N, XS)) → N
natsFrom(N) → cons(N, n__natsFrom(s(N)))
sel(N, XS) → head(afterNth(N, XS))
snd(pair(X, Y)) → Y
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U11(tt, N, X, activate(XS))
tail(cons(N, XS)) → activate(XS)
take(N, XS) → fst(splitAt(N, XS))
natsFrom(X) → n__natsFrom(X)
activate(n__natsFrom(X)) → natsFrom(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 2 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
QDP
                      ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U111(tt, x0, y1, y2) → SPLITAT(x0, activate(y2))
SPLITAT(s(N), cons(X, XS)) → U111(tt, N, X, activate(XS))

The TRS R consists of the following rules:

U11(tt, N, X, XS) → U12(splitAt(activate(N), activate(XS)), activate(X))
U12(pair(YS, ZS), X) → pair(cons(activate(X), YS), ZS)
afterNth(N, XS) → snd(splitAt(N, XS))
and(tt, X) → activate(X)
fst(pair(X, Y)) → X
head(cons(N, XS)) → N
natsFrom(N) → cons(N, n__natsFrom(s(N)))
sel(N, XS) → head(afterNth(N, XS))
snd(pair(X, Y)) → Y
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U11(tt, N, X, activate(XS))
tail(cons(N, XS)) → activate(XS)
take(N, XS) → fst(splitAt(N, XS))
natsFrom(X) → n__natsFrom(X)
activate(n__natsFrom(X)) → natsFrom(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule U111(tt, x0, y1, y2) → SPLITAT(x0, activate(y2)) at position [1] we obtained the following new rules:

U111(tt, y0, y1, n__natsFrom(x0)) → SPLITAT(y0, natsFrom(x0))
U111(tt, y0, y1, x0) → SPLITAT(y0, x0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
QDP
                          ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

SPLITAT(s(N), cons(X, XS)) → U111(tt, N, X, activate(XS))
U111(tt, y0, y1, n__natsFrom(x0)) → SPLITAT(y0, natsFrom(x0))
U111(tt, y0, y1, x0) → SPLITAT(y0, x0)

The TRS R consists of the following rules:

U11(tt, N, X, XS) → U12(splitAt(activate(N), activate(XS)), activate(X))
U12(pair(YS, ZS), X) → pair(cons(activate(X), YS), ZS)
afterNth(N, XS) → snd(splitAt(N, XS))
and(tt, X) → activate(X)
fst(pair(X, Y)) → X
head(cons(N, XS)) → N
natsFrom(N) → cons(N, n__natsFrom(s(N)))
sel(N, XS) → head(afterNth(N, XS))
snd(pair(X, Y)) → Y
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U11(tt, N, X, activate(XS))
tail(cons(N, XS)) → activate(XS)
take(N, XS) → fst(splitAt(N, XS))
natsFrom(X) → n__natsFrom(X)
activate(n__natsFrom(X)) → natsFrom(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule U111(tt, y0, y1, n__natsFrom(x0)) → SPLITAT(y0, natsFrom(x0)) at position [1] we obtained the following new rules:

U111(tt, y0, y1, n__natsFrom(x0)) → SPLITAT(y0, n__natsFrom(x0))
U111(tt, y0, y1, n__natsFrom(x0)) → SPLITAT(y0, cons(x0, n__natsFrom(s(x0))))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ Narrowing
QDP
                              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

SPLITAT(s(N), cons(X, XS)) → U111(tt, N, X, activate(XS))
U111(tt, y0, y1, n__natsFrom(x0)) → SPLITAT(y0, cons(x0, n__natsFrom(s(x0))))
U111(tt, y0, y1, x0) → SPLITAT(y0, x0)
U111(tt, y0, y1, n__natsFrom(x0)) → SPLITAT(y0, n__natsFrom(x0))

The TRS R consists of the following rules:

U11(tt, N, X, XS) → U12(splitAt(activate(N), activate(XS)), activate(X))
U12(pair(YS, ZS), X) → pair(cons(activate(X), YS), ZS)
afterNth(N, XS) → snd(splitAt(N, XS))
and(tt, X) → activate(X)
fst(pair(X, Y)) → X
head(cons(N, XS)) → N
natsFrom(N) → cons(N, n__natsFrom(s(N)))
sel(N, XS) → head(afterNth(N, XS))
snd(pair(X, Y)) → Y
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U11(tt, N, X, activate(XS))
tail(cons(N, XS)) → activate(XS)
take(N, XS) → fst(splitAt(N, XS))
natsFrom(X) → n__natsFrom(X)
activate(n__natsFrom(X)) → natsFrom(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
QDP
                                  ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

SPLITAT(s(N), cons(X, XS)) → U111(tt, N, X, activate(XS))
U111(tt, y0, y1, n__natsFrom(x0)) → SPLITAT(y0, cons(x0, n__natsFrom(s(x0))))
U111(tt, y0, y1, x0) → SPLITAT(y0, x0)

The TRS R consists of the following rules:

U11(tt, N, X, XS) → U12(splitAt(activate(N), activate(XS)), activate(X))
U12(pair(YS, ZS), X) → pair(cons(activate(X), YS), ZS)
afterNth(N, XS) → snd(splitAt(N, XS))
and(tt, X) → activate(X)
fst(pair(X, Y)) → X
head(cons(N, XS)) → N
natsFrom(N) → cons(N, n__natsFrom(s(N)))
sel(N, XS) → head(afterNth(N, XS))
snd(pair(X, Y)) → Y
splitAt(0, XS) → pair(nil, XS)
splitAt(s(N), cons(X, XS)) → U11(tt, N, X, activate(XS))
tail(cons(N, XS)) → activate(XS)
take(N, XS) → fst(splitAt(N, XS))
natsFrom(X) → n__natsFrom(X)
activate(n__natsFrom(X)) → natsFrom(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: